package com.sm.tool.entity.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @program: practice
 * @description:
 * @author: liqitian.
 * @create: 2019-11-15 15:39
 **/
@Data
@ApiModel
public class UserPhoneLoginRequest {

    @Pattern(regexp="^-?[1-9]\\d*$",message = "手机号码必须11位且全部为整数数字")
    @Length(min = 11, max = 11, message = "手机号码必须11位")
    @ApiModelProperty(value = "手机号码",example ="1318787xxxx",required = true)
    private String phone;

    @Length(min = 4, max = 4, message = "注册验证码必须4位且全部为整数数字")
    @Pattern(regexp="^-?[1-9]\\d*$",message = "验证码必须全部为整数数字")
    @ApiModelProperty(value = "验证码",example ="7762",required = true)
    private String verificationCode;

}
